<script src="_js/jquery.js"></script>
<?php $this->fetch('public/head') ?>

    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class=""><a href="<?php echo url('index') ?>">信息列表</a></li>
            <li class="layui-this">编辑信息</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form" action="<?php echo url('update') ?>" method="post">

                <div class="layui-form">
                        <div class="layui-fluid">
                            <div class="layui-form layui-col-md12">
                                <div class="layui-form-item">
                                    <div class="layui-col-md4">
                                        <input type="hidden" name="id" value="<?php echo $rows['id'] ?>">
                                        <label class="layui-form-label">负责城市</label>
                                        <div class="layui-input-block">
                                            <select name="city" id="select_base_cityname" lay-filter="select_base_cityname"  lay-search lay-filter="province" lay-verify="required" xm-select="select_base_cityname" xm-select-type="1">
                                                <?php foreach($province as $key=>$value): ?>
                                                    <option value="<?php echo $value ?>"><?php echo $value ?></option>
                                                <?php endforeach ?>

                                            </select>
                                            <br>
                                            <br>
                                            <br>
                                            <div class="layui-form-item">
                                                <div class="layui-input-block">
                                                    <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>



<!--
                    <div class="layui-form-item">
                        <label class="layui-form-label">负责城市</label>
                        <div class="layui-input-block">
                            <div class="layui-inline">
                                <select name="city" id="province" lay-verify="required" lay-search lay-filter="province">
                                    <option value="<?php /*echo $rows['city'] */?>"><?php /*echo $rows['city'] */?></option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <input type="hidden" name="id" value="<?php /*echo $rows['id'] */?>">
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                            <!-- <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>-->
                    </div>
                </form>
            </div>
        </div>
    </div>
<?php $this->fetch('public/script') ?>
<script type="text/javascript">
    $(function(){
        var formSelects = layui.formSelects;

        var selected = "<?php echo $rows['city'] ?>";
        formSelects.value('select_base_cityname',selected.split(","));

    });
    //全局定义一次, 加载formSelects
    layui.config({
        base: '/' //此处路径请自行处理, 可以使用绝对路径
    }).extend({
        formSelects: 'formSelects-v4'
    });
    //加载模块
    layui.use(['jquery', 'formSelects'], function () {
        var formSelects = layui.formSelects;

    });
</script>

<!--<link href="_admin/city/layui/css/layui.css" rel="stylesheet" />
<script src="_admin/city/layui/layui.js" type="text/javascript"></script>
<script src="_admin/city/js/jquery.min.js" type="text/javascript"></script>
<script src="_admin/city/js/area.js" type="text/javascript"></script>
<script src="_admin/city/js/select.js" type="text/javascript"></script>-->
